import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import seven.config.SpringConfiguration;
import seven.servlet.AdminServlet;
import seven.servlet.UserServlet;

public class main4 {
    @Test
    public void run(){
        ApplicationContext applicationContext=new AnnotationConfigApplicationContext(SpringConfiguration.class);
        UserServlet userServlet=applicationContext.getBean(UserServlet.class);
        System.out.println(userServlet.userService+"==="+userServlet.adminService+"==="+userServlet.goodsService);

        AdminServlet adminServlet=applicationContext.getBean(AdminServlet.class);
        System.out.println(adminServlet.userService+"==="+adminServlet.adminService+"==="+adminServlet.goodsService);
    }
}
